// import logo from './logo.svg';
// import './App.css';
import User from '../User'  //引入函数组件
import Class from '../Class'  //引入类组件
import React from'react'
function App() {
  const userName = "知否技术"
  const userAge = 18
  const userList = [{
    id: 1,
    name: '张三'
  }, {
    id: 2,
    name: '李四'
  }, {
    id: 3,
    name: '王五'
  },
  {
    id: 3,
    name: '王五11'
  }]
  return (
    <div className="App">
      <h1>
        姓名：{userName}
      </h1>
      <h1>
        姓名：{userName}123456
      </h1>
      <h2>
        年龄：{userAge}
      </h2>
      {userList.map(item=><h2 key={item.id}>{item.name}</h2>)}
     <h2>{userAge > 18 ?'成年人':'未成年人'}</h2>
     <User/>
     <Class/>
    </div>
  );
}

export default App;
